'use strict';

const Controller = require('egg').Controller;

class HtmlToPDFController extends Controller {
  async index() {
    const { ctx } = this;
    const payload = ctx.request.body || {};
    const res = await ctx.service.htmltopdf.index(payload);
    ctx.helper.success({ ctx, res });
  }

  async htmltopdftest() {
    const { ctx } = this;
    const payload = ctx.request.body || {};
    const res = await ctx.service.htmltopdf.test(payload);
    ctx.helper.success({ ctx, res });
  }

}

module.exports = HtmlToPDFController;
